data<-read.table("whole_half_1_2_4_r2_clubbed.txt",sep="\t",head=T)
whole<-as.vector(data[,2])
position<-as.vector(data[,1])
halfquatermb<-as.vector(data[,5])
quatermb<-as.vector(data[,6])
halfmb<-as.vector(data[,7])
mb1<-as.vector(data[,8])
mb2<-as.vector(data[,9])
mb4<-as.vector(data[,10])

pdf("whole_half_1_2_4_r2_clubbed.pdf")
myline1 <-lm(halfquatermb~whole)
data1 <- summary(myline1)
attach(data1)
var1<-""
var1 <- r.squared
var1
y <- "WHOLE VS HALFQUATER MB CHOPPING: CORRELATION="
z<-format(var1, digits=3)
u <- paste(y,z)
plot(whole, halfquatermb, main=u,xlab="whole_r2", ylab="halfquatermb_r2",xlim=c(0,1),ylim =c(0,1))
abline(lm(halfquatermb~whole), col="red")

myline1 <-lm(quatermb~whole)
data1 <- summary(myline1)
attach(data1)
var1<-""
var1 <- r.squared
var1
y <- "WHOLE VS QUARTERMB CHOPPING: CORRELATION="
z<-format(var1, digits=3)
u <- paste(y,z)
plot(whole, quatermb, main=u,xlab="whole_r2", ylab="quatermb_r2",xlim=c(0,1),ylim =c(0,1))
abline(lm(quatermb~whole), col="red")


myline1 <-lm(halfmb~whole)
data1 <- summary(myline1)
attach(data1)
var1<-""
var1 <- r.squared
var1
y <- "WHOLE VS HALFMB CHOPPING: CORRELATION="
z<-format(var1, digits=3)
u <- paste(y,z)
plot(whole, halfmb, main=u,xlab="whole_r2", ylab="halfmb_r2",xlim=c(0,1),ylim =c(0,1))
abline(lm(halfmb~whole), col="red")


myline1 <-lm(mb1~whole)
data1 <- summary(myline1)
attach(data1)
var2<-""
var2 <- r.squared
var2
y <- "WHOLE VS 1MB CHOPPING: CORRELATION="
z<-format(var2, digits=3)
u <- paste(y,z)
plot(whole, mb1, main=u,xlab="whole_r2", ylab="1mb_r2",xlim=c(0,1),ylim =c(0,1))
abline(lm(mb1~whole), col="red")


myline1 <-lm(mb2~whole)
data1 <- summary(myline1)
attach(data1)
var2<-""
var2 <- r.squared
var2
y <- "WHOLE VS 2MB CHOPPING: CORRELATION="
z<-format(var2, digits=3)
u <- paste(y,z)
plot(whole, mb2, main=u,xlab="whole_r2", ylab="2mb_r2",xlim=c(0,1),ylim =c(0,1))
abline(lm(mb2~whole), col="red")

myline1 <-lm(mb4~whole)
data1 <- summary(myline1)
attach(data1)
var2<-""
var2 <- r.squared
var2
y <- "WHOLE VS 4MB CHOPPING: CORRELATION="
z<-format(var2, digits=3)
u <- paste(y,z)
plot(whole, mb4, main=u,xlab="whole_r2", ylab="4mb_r2",xlim=c(0,1),ylim =c(0,1))
abline(lm(mb4~whole), col="red")

dev.off()



